package org.flashamaphone.voices
{
	import flash.utils.ByteArray;
	
	import org.flashamaphone.voices.waveformFactories.IWaveFactory;
	
	/** 
	 * voice interface
	 */
	public interface IVoice
	{	
		/**
		 * get volume
		 * 
		 * @return volume
		 */
		function get volume():Number;
		
		/**
		 * set volume
		 * 
		 * @param volume
		 */
		function set volume(value:Number):void;
		
		/**
		 * get press phase bytes
		 * 
		 * @param frequency
		 * @param duration (milliseconds)
		 * @param waveform
		 * @return sound byteArray
		 */
		function press(freq:Number, milliseconds:Number, waveform:IWaveFactory = null):ByteArray;
		
		/**
		 * get hold bytes
		 * 
		 * @param frequency
		 * @param duration (milliseconds)
		 * @param if is streaming
		 * @param waveform
		 * @return sound byteArray
		 */
		function hold(freq:Number, milliseconds:Number, streaming:Boolean=false, waveform:IWaveFactory = null):ByteArray;
		
		/**
		 * get unpress bytes
		 * 
		 * @param frequency
		 * @param duration (milliseconds)
		 * @param waveform
		 * @return sound byteArray
		 */
		function unpress(freq:Number, milliseconds:Number, waveform:IWaveFactory = null):ByteArray;
		
		/** 
		 * get press duration
		 * 
		 * @return duration
		 */
		function get pressDuration():int;
		
		/** 
		 * get hold duration
		 * 
		 * @return duration
		 */
		function get holdDuration():int;
		
		/** 
		 * get unpress duration
		 * 
		 * @return duration
		 */
		function get unpressDuration():int;
	}
}